package com.pylc.model.dao.impl;

import com.pylc.model.dao.AreaDao;
import com.pylc.model.entity.Area;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author Lindsey
 */
public class testAreaDaoImpl {
    private AreaDao areaDao = null;

    @Before
    public void before() {
        String[] paths = { "classpath:applicationContext.xml" };
        ApplicationContext ctx = new ClassPathXmlApplicationContext(paths);
        areaDao = (AreaDaoImpl) ctx.getBean("areaDaoImpl");
    }

    @Test
    public void testGetRootList() throws Exception {

    }

    @Test
    public void testGetParent() throws Exception {

    }

    @Test
    public void testGetChildren() throws Exception {

    }

    @Test
    public void testIsNameUnique() throws Exception {

    }

    @Test
    public void testGet() throws Exception {

    }

    @Test
    public void testLoad() throws Exception {

    }

    @Test
    public void testGetList() throws Exception {

    }

    @Test
    public void testGetAll() throws Exception {

    }

    @Test
    public void testGetTotalCount() throws Exception {

    }

    @Test
    public void testIsUnique() throws Exception {

    }

    @Test
    public void testIsExist() throws Exception {

    }

    @Test
    public void testSave() throws Exception {
        Area area = new Area();
        area.setName("厦门1111");
        area.setParent(null);
        area.setDepth(1);
        area.setSortOrder(1);
        areaDao.save(area);
    }

    @Test
    public void testUpdate() throws Exception {

    }

    @Test
    public void testDelete() throws Exception {

    }
}
